package com.whmskj.xjlhbc.mobile.controller;

import com.whmskj.xjlhbc.core.AjaxResult;
import com.whmskj.xjlhbc.service.WarehouseDailyReportService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: Sakura
 * @Date: 2025/8/20 15:56
 * @Version: v1.0.0
 * @Description: TODO
 **/
@RestController
@Tag(name = "仓库日报",description = "仓库日报")
@RequestMapping("/warehouseDailyReport")
public class WarehouseDailyReportController {

    @Autowired
    private WarehouseDailyReportService WpService ;

    /**
     * 获取原纱日报列表
     * @param keyword
     * @return
     */
    @GetMapping("/ysrb")
    public AjaxResult getYsrbList(
            @RequestParam(value = "keyword", required = false) String keyword) {
        return WpService.getYsrbList(keyword);
    }

    /**
     * 获取包装物日报列表
     * @param keyword
     * @return
     */
    @GetMapping("/bzwrb")
    public AjaxResult getBzwrbList(
            @RequestParam(value = "keyword", required = false) String keyword) {
        return WpService.getBzwrbList(keyword);
    }

    /**
     * 获取成品日报列表
     * @param keyword
     * @return
     */
    @GetMapping("/cprb")
    public AjaxResult getCprbList(
            @RequestParam(value = "keyword", required = false) String keyword) {
        return WpService.getCprbList( keyword);
    }

    /**
     * 快捷筛选接口
     * @param date
     * @param keyword
     * @return
     */
    // 快捷筛选接口 - 同时查询三类数据
    @GetMapping("/quickSearch")
    public AjaxResult quickSearch(@RequestParam(value = "date", required = false) String date,
                                  @RequestParam(value = "keyword", required = true) String keyword) {
        Map<String, Object> result = new HashMap<>();
        return AjaxResult.success(result);
    }

}
